This configuration shows an example of how to use the Generic Serial Slave driver to configure the G500XLT option card for an arbitrary ASCII protocol.

The example protocol is ASCII based and uses 8 data bits per character. The example protocol expects 1 second of gap time between request packets, and therefore there must be less than 1 second of gap time between characters of a single packet.


The example protocol supports the following commands:

Status Request
Reads the inverter's current status including whether its running, running direction, running frequency, and frequency reference.

Set Frequency Command
Sets the frequency reference in Hz.

Forward Run Command
Runs the inverter forward at the current frequency reference.

Reverse Run Command
Runs the inverter reverse at the current frequency reference.

Stop Command
Stops the inverter.


The structure of the request and response packets are as follows, where [CR] indicates a carriage return character (0x0D) and [LF] indicates a line feed character (0x0A):


Status Request Command:

Request:
Status[CR][LF]

Response:
[RUN_STATUS][CR][LF]Direction = [DIR][CR]LF]Running Freq = [RUN_FREQ][CR][LF]Freq Ref = [FREQ_REF][CR][LF]

[RUN_STATUS] is either Running or Stopped
[DIR] is either FWD or REV
[RUN_FREQ] is the actual running frequency in Hz
[FREQ_REF] is the current frequency reference in Hz


Set Frequency Command:

Request:
Freq = [FREQ_CMD][CR][LF]

Response:
OK[CR][LF]

[FREQ_CMD] is the frequency command in Hz


Forward Run Command:

Request:
FWD[CR][LF]

Response:
OK[CR][LF]


Reverse Run Command:

Request:
REV[CR][LF]

Response:
OK[CR][LF]


Stop Command:

Request:
Stop[CR][LF]

Response:
OK[CR][LF]


Invalid Command:

Response:
??[CR][LF]